/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.icode.test;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.FlowLayout;
import javax.swing.JApplet;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
import net.miginfocom.swing.MigLayout;

/**
 *
 * @author Hot_Girls
 */
public class LoginForm extends JApplet{

    JLabel lblUsername, lblPassword;
    JPasswordField txtPass;
    JTextField txtUsername;
    JButton btnLogin;
    
    @Override
    public void init() {
        super.init();        
        JPanel p1 = new JPanel(new BorderLayout());
        JPanel p2 = new JPanel(new MigLayout());
        JPanel p3 = new JPanel(new FlowLayout(FlowLayout.RIGHT));
        
        this.lblUsername = new JLabel("Username");
        this.lblPassword = new JLabel("Password");
        this.btnLogin = new JButton("Login");
        this.txtUsername = new JTextField(20);
        this.txtPass = new JPasswordField(20);
        
        p2.add(this.lblUsername);
        p2.add(this.txtUsername, "wrap");
        
        p2.add(this.lblPassword);
        p2.add(this.txtPass);
        
        p3.add(this.btnLogin);
        
        p1.add(p2, BorderLayout.CENTER);
        p1.add(p3, BorderLayout.SOUTH);
      
        p1.setSize(400, 300);
        this.getContentPane().add(p1);
    }
    
}
